export function uuid() {
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
    let r = (Math.random() * 16) | 0,
      v = c === "x" ? r : (r & 0x3) | 0x8;
    return v.toString(16);
  });
}

/**
 * 自定义取拼接后的 folderId
 */
export const getOriginFolderId = ( path ) => {
  console.log(path)
  if(Array.isArray(path)){
      return path.map(v =>{
          v = String(v)
          if(v.includes('-|-')){
              let arrs = v.split('-|-')
              let str = arrs[arrs.length - 1] 
              return str
          }else{
              return v
          }
      })
  }

  let str = ''
  if(path && path.includes && path.includes('-|-')){
      let arrs = path.split('-|-')
      str = arrs[arrs.length - 1]        
  }else{
      str = path
  }
  return Number( str )
}